/*
 Navicat MySQL Data Transfer

 Source Server         : local
 Source Server Version : 50717
 Source Host           : localhost
 Source Database       : shirodb

 Target Server Version : 50717
 File Encoding         : utf-8

 Date: 10/17/2018 20:54:25 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `sys_permissions`
-- ----------------------------
DROP TABLE IF EXISTS `sys_permissions`;
CREATE TABLE `sys_permissions` (
  `permission` varchar(255) DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(255) DEFAULT NULL,
  `available` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `sys_permissions`
-- ----------------------------
BEGIN;
INSERT INTO `sys_permissions` VALUES ('user:create', '4', '添加用户', '1'), ('user:update', '5', '修改用户', '1'), ('menu:create', '6', '添加菜单', '1');
COMMIT;

-- ----------------------------
--  Table structure for `sys_roles`
-- ----------------------------
DROP TABLE IF EXISTS `sys_roles`;
CREATE TABLE `sys_roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `available` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `sys_roles`
-- ----------------------------
BEGIN;
INSERT INTO `sys_roles` VALUES ('3', 'admin', '管理员', '1'), ('4', 'user', '普通员工', '1');
COMMIT;

-- ----------------------------
--  Table structure for `sys_roles_permissions`
-- ----------------------------
DROP TABLE IF EXISTS `sys_roles_permissions`;
CREATE TABLE `sys_roles_permissions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role_id` int(11) DEFAULT NULL,
  `permission_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `sys_roles_permissions`
-- ----------------------------
BEGIN;
INSERT INTO `sys_roles_permissions` VALUES ('6', '3', '4'), ('7', '3', '5'), ('8', '3', '6'), ('9', '4', '4'), ('10', '4', '5');
COMMIT;

-- ----------------------------
--  Table structure for `sys_users`
-- ----------------------------
DROP TABLE IF EXISTS `sys_users`;
CREATE TABLE `sys_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `salt` varchar(255) DEFAULT NULL,
  `locked` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `sys_users`
-- ----------------------------
BEGIN;
INSERT INTO `sys_users` VALUES ('5', 'zhang', '05daa61ce08c56fb3a24811c946c8f55', '2829a4d3afc845c9996c320ce8a0e216', '0'), ('6', 'li', '008a6c7c262e53b058508fee0f88867d', 'c63fcc9985220a0fc30a210c542e1ba2', '0'), ('7', 'wu', 'e5a674f7b85757fd4dedfa7f55241523', 'ed1d4cbb6dcaa4eb743b6441b1d6403b', '0'), ('8', 'wang', '37487e0a614a9af5d0d15330ab5dc297', '40cfe8482a16c3ad91ebe457fc819c5d', '1');
COMMIT;

-- ----------------------------
--  Table structure for `sys_users_roles`
-- ----------------------------
DROP TABLE IF EXISTS `sys_users_roles`;
CREATE TABLE `sys_users_roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `role_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `sys_users_roles`
-- ----------------------------
BEGIN;
INSERT INTO `sys_users_roles` VALUES ('2', '5', '3');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
